package com.sxf.biz.ocr.service;

import java.util.Base64;

/**
 * @projectName: lego-integrate-basicinfo
 * @package: com.ccccit.basicinfo.api.utils
 * @className: ImageEncodingUtils
 * @author: guolei
 * @date: 2020/11/4 10:46
 * @description:
 */
public class ImageEncodingUtils {
    private static Base64.Encoder ENCODER = Base64.getEncoder();
    private static Base64.Decoder DECODER = Base64.getDecoder();

    public static String encodingImage(byte[] imageByteArray){
        return ENCODER.encodeToString(imageByteArray);
    }

    public static byte[] decod(String encodeText){
        return DECODER.decode(encodeText);
    }
}
